package book;

public class BookList {
    private Book[] books = new Book[10];
    private int usedSize;

    public BookList() {
        books[0] = new Book("大神全能","郭祥",99999,"大神级别");
        books[1] = new Book("牛马+爱情+自律+大神+恶心+久居人下","胡志畅",1,"牛马级别");
        books[2] = new Book("爱情密码","檀超",88888,"爱情");
        books[3] = new Book("幽默小能手","渠小勇",22222,"幽默");
        this.usedSize = 4;
    }

    public void setBooks (int i, Book book) {
        books[i] = book;
    }

    public void addBook(Book book) {
        books[this.usedSize] = book;
        this.usedSize +=1;
    }
    public Book getBook(int i) {
        return books[i];
    }
    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }
}
